import request from '@/utils/request'

const api_name = '/oss'

export default {
  // 上传cms模块的图片并返回图片链接
  uploadOssFileCms(formData) {
    return request({
      url: `${api_name}/cms`,
      method: 'post',
      data: formData
    })
  },
  // 上传头像图标并返回链接
  uploadOssFileAvatar(formData) {
    return request({
      url: `${api_name}/avatar`,
      method: 'post',
      data: formData
    })
  },
  // 上传oj模块的图片并返回图片链接
  uploadOssFileOj(formData) {
    return request({
      url: `${api_name}/oj`,
      method: 'post',
      data: formData
    })
  }
}
